/*
** my_strcat.c for lib in /home/boulah_m/myls-2016-boulah_m/lib
**
** Made by moustafa boulahia
** Login   <boulah_m@epitech.net>
**
** Started on  Tue Dec 20 08:42:20 2011 moustafa boulahia
** Last update Tue Jan 31 08:08:13 2012 moustafa boulahia
*/
#include <stdlib.h>
#include "my.h"
char	*my_strcat(char *dest, char *src)
{
  char	*ret;
  int	i;
  int	j;

  i = 0;
  j = 0;
  ret = malloc(my_strlen(dest) + my_strlen(src) + 1);
  if (ret == NULL)
    return (NULL);
  else
    {
      if (dest)
	while (dest[i] != '\0')
	  {
	    ret[i] = dest[i];
	    i++;
	  }
      if (src)
	while (src[j] != '\0')
	  {
	    ret[i] = src[j];
	    i++;
	    j++;
	  }
      return (ret);
    }
}
